Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickTime Components /
Chapter 11 - Clock Components / Clock Components Reference
Movie Toolbox Clock Support Functions /


ExecuteCallBack

When your clock component determines that it is time to execute a callback function, your component should call the ExecuteCallBack function.

pascal void ExecuteCallBack (QTCallBack cb);
cb
Specifies the callback event for the operation. Your clock component obtains this value from the parameters passed to your ClockCallMeWhen function (described on page 11-10).
DESCRIPTION
This function handles all the details of invoking the callback function properly. For example, the ExecuteCallBack function queues the callback function correctly, according to the function's ability to execute at interrupt time (specified in the callBackType parameter to your ClockNewCallBack function, described on page 11-9).

Before calling the application's function, the ExecuteCallBack function cancels the callback event. In this manner, the callback event is prevented from executing twice in succession. It is up to the application, or the callback function itself, to reschedule the callback event.

SPECIAL CONSIDERATIONS
This function sets the A5 register to the value it contained at the time the callback event was scheduled when calling the callback function.

Your clock component should not release the memory associated with the callback event at this time. You should do so only in your ClockDisposeCallBack function (described on page 11-13). This is particularly important when a callback function cannot execute at interrupt time, since the Movie Toolbox schedules such functions for invocation at a later time.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help